23. Taylor Series

Recall: The Taylor series for \(f(x)\) about \(x=a\) is: (assuming it converges) \[\begin{aligned} f(x) &=\sum_{n=0}^\infty \dfrac{f^{(n)}(a)}{n!}(x-a)^n \\ &=f(a)+f'(a)(x-a)+\dfrac{f''(a)}{2}(x-a)^2 \\[2 pt] &\quad+\dfrac{f^{(3)}(a)}{3!}(x-a)^3+\cdots+\dfrac{f^{(n)}(a)}{n!}(x-a)^n+\cdots \end{aligned}\]

a.2. Computing Taylor Series

In the previous chapter, we found series which converged to functions such as \(\dfrac{1}{1+3x^2}\), \(\ln(1+x)\) and \(\arctan x\) by manipulating the geometric series which converges to \(\dfrac{1}{1-x}\). By the Taylor Series Theorem, these series must be the Taylor series for these functions. We now turn to other functions and construct the Taylor series directly from the definition:

Find the Taylor series for \(f(x)=\ln x\) centered at \(x=3\). Then find its radius of convergence and interval of convergence. (Write out the series up to \(4^\text{th}\) degree and then find the summation form with the general term.)

We make a table of the function and its derivatives up to \( 4^\text{th}\) order: \[\begin{aligned} f(x)&=\ln x \\ f'(x)&=x^{-1} \\ f''(x)&=(-1)x^{-2} \\ f'''(x)&=(-1)(-2)x^{-3} \\ f^{(4)}(x)&=(-1)(-2)(-3)x^{-4} \end{aligned}\] We evaluate the function and derivatives at \(x=3\): \[\begin{aligned} f(3)&=\ln3&=\ln3 \\ f'(3)&=3^{-1}&=\dfrac{1}{3} \\ f''(3)&=(-1)3^{-2}&=\dfrac{-1}{9} \\ f'''(3)&=(-1)(-2)3^{-3}&=\dfrac{2}{27} \\ f^{(4)}(3)&=(-1)(-2)(-3)3^{-4}&=\dfrac{-2}{27} \end{aligned}\] We then plug these into the Taylor series (Don't forget the factorials.): \[\begin{aligned} f(x)&=f(3)+f'(3)(x-3)+\dfrac{f''(3)}{2}(x-3)^2 \\ &\quad+\dfrac{f'''(3)}{3!}(x-3)^3+\dfrac{f^{(4)}(3)}{4!}(x-3)^4+\cdots \\ \ln x&=\ln3+\dfrac{1}{3}(x-3)-\dfrac{1}{18}(x-3)^2 \\ &\quad+\dfrac{1}{81}(x-3)^3-\dfrac{1}{324}(x-3)^4+\cdots \end{aligned}\] To express the series in summation form we need the general term. We generalize the previous derivatives to get the \(n^\text{th}\) derivative: \[\begin{aligned} f^{(n)}(x)&=(-1)^{n-1}(n-1)!\,x^{-n} \\ f^{(n)}(3)&=\dfrac{(-1)^{n-1}(n-1)!}{3^n} \end{aligned}\] Notice this formula works for \(n \ge 1\) but does not work for the \(n=0\) term which is just the function. So the Taylor series is \[\begin{aligned} f(x) &=\sum_{n=0}^\infty \dfrac{f^{(n)}(3)}{n!}(x-3)^n \\ \ln x &=\ln3+\sum_{n=1}^\infty \dfrac{(-1)^{n-1}(n-1)!}{n!\,3^n}(x-3)^n \\ &=\ln3+\sum_{n=1}^\infty \dfrac{(-1)^{n-1}}{n\,3^n }(x-3)^n \end{aligned}\]

\[ \dfrac{(n-1)!}{n!}=\dfrac{(n-1)\cdots1}{n(n-1)\cdots1}=\dfrac{1}{n} \]

To find the radius of convergence, we use the ratio test: \[\begin{aligned} \rho &=\lim_{n\rightarrow\infty}\dfrac{|a_{n+1}|}{|a_n|} =\lim_{n\rightarrow\infty} \dfrac{|x-3|^{n+1}}{(n+1)3^{n+1}}\dfrac{n3^n}{|x-3|^n} \\ &=\dfrac{|x-3|}{3}\lim_{n\rightarrow\infty}\dfrac{n+1)}{n} =\dfrac{|x-3|}{3} \lt 1 \end{aligned}\] So the series is absolutely convergent if \(|x-3| \lt 3\) and the radius of convergence is \(R=3\). At \(x=0\), the series becomes a harmonic series and so is divergent. At \(x=6\), the series becomes an alternating harmonic series and so is convergent. So the interval of convergence is \((0,6]\).

Find the Taylor series for \(f(x)=\dfrac{1}{x^2}\) about \(x=2\). Then find its radius of convergence and interval of convergence. (Write out the series up to \(4^\text{th}\) degree and then find the summation form with the general term.)

\[ \dfrac{(n+1)!}{n!}=\dfrac{(n+1)n!}{n!}=n+1 \]

\(\begin{aligned} \dfrac{1}{x^2}&=\dfrac{1}{4}-\dfrac{1}{4}(x-2)+\dfrac{3}{16}(x-2)^2 \\ &\quad-\dfrac{1}{8}(x-2)^3+\dfrac{5}{64}(x-2)^4+\cdots \\ &=\sum_{n=0}^\infty (-1)^n\dfrac{(n+1)}{2^{n+2}}(x-2)^n \end{aligned}\)
\(R=2\)

The function and \(4\) derivatives and their values at \(x=2\) are: \[\begin{aligned} f(x)&=x^{-2} &f(2)&=2^{-2}=\dfrac{1}{4} \\ f'(x)&=(-2)x^{-3} &f'(2)&=(-2)2^{-3}=\dfrac{-1}{4} \\ f''(x)&=(-2)(-3)x^{-4} &f''(2)&=(-2)(-3)2^{-4}=\dfrac{3}{8} \\ f'''(x)&=(-2)(-3)(-4)x^{-5} &f'''(2)&=(-2)(-3)(-4)2^{-5}=\dfrac{-3}{4}\quad \\ f^{(4)}(x)&=(-1)^45!\,x^{-6} &f^{(4)}(2)&=(-1)^4 5!\,2^{-6}=\dfrac{15}{8} \end{aligned}\] So the Taylor series is: \[\begin{aligned} f(x)&=f(2)+f'(2)(x-2)+\dfrac{f''(2)}{2}(x-2)^2 \\ &\quad+\dfrac{f'''(2)}{3!}(x-2)^3+\dfrac{f^{(4)}(2)}{4!}(x-2)^4+\cdots \\ \dfrac{1}{x^2}&=\dfrac{1}{4}-\dfrac{1}{4}(x-2)+\dfrac{3}{16}(x-2)^2 \\ &\quad-\dfrac{1}{8}(x-2)^3+\dfrac{5}{64}(x-2)^4+\cdots \end{aligned}\] To express the series in summation form, we generalize the derivatives to the \(n^\text{th}\) derivative: \[\begin{aligned} f^{(n)}(x)&=(-1)^n(n+1)!\,x^{-(n+2)} \\ f^{(n)}(2)&=\dfrac{(-1)^n(n+1)!}{2^{n+2}} \end{aligned}\] So the Taylor series is \[\begin{aligned} f(x) &=\sum_{n=0}^\infty \dfrac{f^{(n)}(2)}{n!}(x-2)^n \\ \dfrac{1}{x^2} &=\sum_{n=0}^\infty \dfrac{(-1)^n(n+1)!}{n!\,2^{n+2}}(x-2)^n \\ &=\sum_{n=0}^\infty (-1)^n\dfrac{(n+1)}{2^{n+2}}(x-2)^n \end{aligned}\] To find the radius of convergence, use the ratio test: \[\begin{aligned} \lim_{n\rightarrow\infty} \dfrac{|a_{n+1}|}{|a_n|} &=\lim_{n\rightarrow\infty} \dfrac{(n+2)|x-2|^{n+1}}{2^{n+3}}\dfrac{2^{n+2}}{(n+1)|x-2|^n} \\ &=\dfrac{|x-2|}{2}\lim_{n\rightarrow\infty} \dfrac{(n+2)}{(n+1)} =\dfrac{|x-2|}{2} \lt 1 \end{aligned}\] So the series is absolutely convergent if \(|x-2| \lt 2\) and the radius of convergence is \(R=2\). At \(x=0\), the series becomes \(\displaystyle \sum_{n=0}^\infty \dfrac{(n+1)}{4}\) which diverges by the \(n^\text{th}\)-Term Divergence Test. At \(x=4\), the series becomes \(\displaystyle \sum_{n=0}^\infty (-1)^n\dfrac{(n+1)}{4}\) which also diverges by the \(n^\text{th}\)-Term Divergence Test. So the interval of convergence is \((0,4)\).

Caution: At this point, we do not yet know whether the Taylor series for each of these functions, \(f(x)\), actually converges to \(f(x)\). That will be shown at the end of this chapter when we discuss Taylor Series Convergence Proofs.

© MYMathApps

Supported in part by NSF Grant #1123255